<template>
  <div class="tabbar">
    <div class="tabbat-item"
         v-for="(item,index) in list"
         :key="index"
         :class="index == 0 ? 'active' : ''">
      <i :class="item.class"></i>
      <span>{{item.text}}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "qkTabbar",
  data () {
    return {
    }
  },
  props: {
    prop: {
      type: Array,
      default () {
        return [
          {
            class: 'iconfont iconbiaodan',
            text: '首页'
          },
          {
            class: 'iconfont iconbiaodan',
            text: '首页'
          },
          {
            class: 'iconfont iconbiaodan',
            text: '首页'
          },
          {
            class: 'iconfont iconbiaodan',
            text: '首页'
          }
        ]
      }
    }
  },
  computed: {
    list () {
      return this.prop
    }
  }
}
</script>

<style lang="scss" scoped>
.active {
  color: #f00;
}
.tabbar {
  width: 100%;
  height: 49px;
  display: flex;
  justify-content: space-between;
  flex-flow: row nowrap;
  background: #fff;
  .tabbat-item {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-flow: column nowrap;
  }
}
</style>